﻿<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>正在投票</title>
    <script src="Scripts/jquery-1.10.2.js"></script>
    <style>
        .maxmain {
            width: 99%;
            height: 99%;
            text-align: center;
            min-width: 960px;
            position: absolute;
            min-height: 350px;
        }

            .maxmain p {
                color: rgba(0, 0, 255, 0.57);
                font-size: 20px;
                font-weight: 800;
            }

            .maxmain span {
                color: rgba(255, 0, 3, 0.57);
                font-size: 20px;
                font-weight: 800;
            }
    </style>
</head>


<body style="min-width: 1000px;">
    <div class="maxmain">
        <img src="Content/img/deng.jpg" style="position: absolute;left: 0;top: 0;">
        <img src="Content/img/pk.jpg" style="margin: auto;width: 600px;height: 200px;">

        <div style="background-image: url(Content/img/erji.gif);width: 250px;height: 250px;position: absolute;right: 0;top: 0;z-index: 2;"></div>

        <div style="background-image: url(Content/img/cd.gif);width: 600px;height: 333px;margin:auto;"></div>
        <div class="player1" style="position: absolute;left: 10%;bottom: 0%;width: 200px;height: auto">
            <img src="Content/img/fj1.jpg" style="border-radius:60%;width: 200px;height: 200px;overflow: hidden;border: solid 5px bisque">
            <p>38号凤一</p>
            <span>666票</span>
            <div style="width: 200px; background-image:url(Content/img/lfbn.png);max-height: 230px;"></div>
        </div>
        <div class="player2" style="position: absolute;right: 10%;bottom: 0%;width: 200px;height: auto">
            <img src="Content/img/fj2.jpg" style="border-radius:60%;width: 200px;height: 200px;border: solid 5px bisque;overflow: hidden;z-index: 1000;position: relative">
            <p>83号凤二</p>
            <span>666票</span>
            <div style="width: 200px; background-image:url(Content/img/flbn.png);max-height: 230px;"></div>
        </div>
    </div>

    <script type="text/javascript">
        var timeid = window.setInterval(update, 500)
        function update() {
            $.ajax({
                url: "/Voting/GetMatchPKInfo",
                type: "POST",
                dataType: "JSON",
                success: function (data) {
                    //选手1
                    $(".player1 img").attr("src", "" + data.FirstPlayer.PlayerImage);
                    $(".player1 p").html(data.FirstPlayer.PlayerNO + "号&nbsp;" + data.FirstPlayer.PlayerName);
                    $(".player1 span").text(data.FirstTickCount+"票");
                    $(".player1 div").css("height", data.FirstTickCount+"px");
                    //选手2
                    $(".player2 img").attr("src", "" + data.SecondPlayer.PlayerImage);
                    $(".player2 p").html(data.SecondPlayer.PlayerNO + "号&nbsp;" + data.SecondPlayer.PlayerName);
                    $(".player2 span").text(data.SecondTickCount + "票");
                    $(".player2 div").css("height", data.SecondTickCount + "px");
                },
                error: function () { }
            });
        }
    </script>
</body>
</html>